<template>
	<view>
		<view class="nav-bar">
			<image src="../../../static/back_icon.png" @tap="back" mode=""></image>
			<view class="center">
				收支明细
			</view>
			<view class="right">
			</view>
		</view>
		<view class="title">
			<view class="left" @tap="chose(1)">
				<view class="">
					收入明细
				</view>
				<view :class="bordered==1?'border':''">
				</view>
			</view>
			<view class="left" @tap="chose(2)">
				<view class="">
					支出明细
				</view>
				<view :class="bordered==2?'border':''">
				</view>
			</view>
		</view>
		<view class="list-pan">
			<view class="list-row" v-for="(item,index) in 20" :key="index">
				<view class="left">
					<view class="up">
						交易成功
					</view>
					<view class="down">
						8月6日 14:59
					</view>
				</view>
				<view class="right">
					<text v-if="bordered==1">+</text>
					<text v-if="bordered==2">-</text>
					<text>1.42</text>
					<text>元</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bordered:1
			}
		},
		methods: {
			//导航方法
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			//选择
			chose(index){
				this.bordered=index;
			},
		}
	}
</script>

<style scoped lang="scss">
	.nav-bar {
		height: 128upx;
		padding: 40upx 28upx 0;
		background: #E8271B;
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		width: 750upx;
		z-index: 10;

		image {
			width: 48upx;
			height: 48upx;
		}

		.center {
			font-size: 36upx;
			font-weight: 500;
			line-height: 70upx;
			color: rgba(255, 255, 255, 1);
		}

		.right {
			width: 48upx;
			height: 48upx;
		}
	}
	.title{
		position: fixed;
		width: 750upx;
		height:238upx;
		background:#F2F2F2;
		z-index: 9;
		display: flex;
		justify-content: center;
		.left{
			font-size:28upx;
			font-weight:500;
			color:rgba(51,51,51,1);
			padding: 148upx 40upx 0;
			.border{
				margin: 0 auto;
				width:44upx;
				height:5upx;
				background:rgba(232,39,27,1);
				border-radius:3upx;
			}
		}
	}
	.list-pan{
		padding-top: 238upx;
		.list-row{
			height:140upx;
			background:rgba(255,255,255,1);
			opacity:1;
			border-bottom: 1upx solid #F2F2F2;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 30upx;
			.left{
				font-size:28upx;
				font-weight:500;
				color:rgba(51,51,51,1);
				.down{
					font-size:24upx;
					font-weight:500;
					line-height:29upx;
					color:rgba(179,179,179,1);
				}
			}
			.right{
				font-size:32upx;
				font-weight:bold;
				line-height:38upx;
				color:rgba(51,51,51,1);
			}
		}
	}
</style>
